<template>
  <view>
    <web-view :src="url" :webview-styles='webviewStyles'></web-view>
  </view>
</template>

<script setup>
import { ref } from 'vue';
import { onLoad } from '@dcloudio/uni-app';
import { useUser } from '@/store';
import { sys } from '@/uni_modules/uv-ui-tools/libs/function/index.js';

const store = useUser()
const userInfo = uni.$uv.deepClone(store.userInfo);
let url = ref('');
let webviewStyles = ref({
  height: sys().windowHeight + 'px'
});

onLoad((option) => {
  url.value = `https://live.polyv.cn/watch/${option.id}?name=${userInfo.nickname}`;
})
</script>

<style>
</style>